<ul class="row list-unstyled">
  <% @departments.each do |department| %>
    <li class="col-sm-8">
      <label class="control-label col-sm-2">公司部门</label>
      <span class="col-sm-4"><%= department.department_name %></span>
      <% unless ['主理人', '财务部', '人资部', '产品部', '市场部', '运营部'].include?(department.department_name)%>
        <%= link_to '删除','javascript:void(0)',
          onclick: "ajax_function('/admin/company_configurations/destroy_configuration', 'department', 'DepartmentConfiguration', #{department.id})",
          id: "delete_department#{department.id}" %>
      <% end %>
    </li>
  <% end %>
  <%= form_for(@department, url: create_department_admin_company_configurations_path, html: { multipart: true}) do |f| %>
    <table>
      <tr>
        <td><%= f.label :公司部门 %></td>
        <td><%= f.text_field :department_name, required: true, :style =>"width:8em" %></td>
      </tr>
      <tr>
        <td colspan='2' >
          <%= f.submit "新增" %>
        </td>
      </tr>
    </table>
  <% end %>
</ul>
